package br.com.bringme.views;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JPasswordField;
import javax.swing.JButton;
import java.awt.Font;
import javax.swing.SwingConstants;
import org.eclipse.wb.swing.FocusTraversalOnArray;
import java.awt.Component;
import javax.swing.ImageIcon;

public class Login {

	private JFrame frmBringmeGerenciador;
	private JTextField tfLogin;
	private JPasswordField pfSenha;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Login window = new Login();
					window.frmBringmeGerenciador.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public Login() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frmBringmeGerenciador = new JFrame();
		frmBringmeGerenciador.setTitle("BringMe - Login");
		frmBringmeGerenciador.setResizable(false);
		frmBringmeGerenciador.setBounds(100, 100, 300, 190);
		frmBringmeGerenciador.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frmBringmeGerenciador.getContentPane().setLayout(null);
		frmBringmeGerenciador.setLocationRelativeTo(null);
		
		
		JLabel lblLogin = new JLabel("Login:");
		lblLogin.setFont(new Font("Century Gothic", Font.PLAIN, 14));
		lblLogin.setBounds(17, 57, 50, 20);
		frmBringmeGerenciador.getContentPane().add(lblLogin);
		
		JLabel lblSenha = new JLabel("Senha:");
		lblSenha.setFont(new Font("Century Gothic", Font.PLAIN, 14));
		lblSenha.setBounds(17, 82, 57, 20);
		frmBringmeGerenciador.getContentPane().add(lblSenha);
		
		tfLogin = new JTextField();
		tfLogin.setFont(new Font("Century Gothic", Font.PLAIN, 12));
		tfLogin.setBounds(70, 59, 190, 20);
		frmBringmeGerenciador.getContentPane().add(tfLogin);
		tfLogin.setColumns(10);
		
		pfSenha = new JPasswordField();
		pfSenha.setFont(new Font("Century Gothic", Font.PLAIN, 12));
		pfSenha.setBounds(70, 84, 190, 20);
		frmBringmeGerenciador.getContentPane().add(pfSenha);
		
		JButton btnEntrar = new JButton("Entrar");
		btnEntrar.setFont(new Font("Century Gothic", Font.PLAIN, 14));
		btnEntrar.setIcon(new ImageIcon(Login.class.getResource("/br/com/bringme/vision/icons/Login_in16.png")));
		btnEntrar.setBounds(162, 111, 98, 30);
		frmBringmeGerenciador.getContentPane().add(btnEntrar);
		
		JLabel lblBringme = new JLabel("BringMe");
		lblBringme.setHorizontalAlignment(SwingConstants.CENTER);
		lblBringme.setFont(new Font("Century Gothic", Font.BOLD, 20));
		lblBringme.setBounds(96, 11, 98, 37);
		frmBringmeGerenciador.getContentPane().add(lblBringme);
		frmBringmeGerenciador.setFocusTraversalPolicy(new FocusTraversalOnArray(new Component[]{tfLogin, pfSenha, btnEntrar}));
	}
}
